package com.risenb.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.risenb.bean.ManagerRole;
import com.risenb.dao.ManagerRoleMapper;
import com.risenb.service.ManagerRoleService;

@Service
public class ManagerRoleServiceImpl implements ManagerRoleService {
	
	@Autowired
	ManagerRoleMapper managerRoleMapper;

	@Override
	public int removeManagerRoleById(Integer id) {
		return managerRoleMapper.removeManagerRoleById(id);
	}

	@Override
	public int createManagerRole(ManagerRole record) {
		return managerRoleMapper.createManagerRole(record);
	}

	@Override
	public ManagerRole queryManagerRoleById(Integer id) {
		return managerRoleMapper.queryManagerRoleById(id);
	}

	@Override
	public int modifyManagerRoleById(ManagerRole record) {
		return managerRoleMapper.modifyManagerRoleById(record);
	}

	@Override
	public List<ManagerRole> queryRoleByManager(Integer manageid) {
		return managerRoleMapper.queryRoleByManager(manageid);
	}

	@Override
	public int removeManagerRoleByIds(String ids) {
		return managerRoleMapper.removeManagerRoleByIds(Arrays.asList(ids.split(",")));
	}

	@Override
	public int removeManagerRoleByManagerId(Integer mid) {
		return managerRoleMapper.removeManagerRoleByManagerId(mid);
	}
}
